home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Archive / Graphics / QuickDraw GX / GX->PostScript Sample / Interfaces&Libraries / Interfaces / CIncludes / GXFonts.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  10.4 KB  |  345 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        GXFonts.h
  3.  
  4.      Contains:    QuickDraw GX font routine interfaces.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    Universal Interfaces 3.0
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __GXFONTS__
  19. #define __GXFONTS__
  20.  
  21. #ifndef __CONDITIONALMACROS__
  22. #include <ConditionalMacros.h>
  23. #endif
  24. #ifndef __GXMATH__
  25. #include <GXMath.h>
  26. #endif
  27. #ifndef __GXTYPES__
  28. #include <GXTypes.h>
  29. #endif
  30. #ifndef __SCALERSTREAMTYPES__
  31. #include <ScalerStreamTypes.h>
  32. #endif
  33.  
  34.  
  35.  
  36. #if PRAGMA_ONCE
  37. #pragma once
  38. #endif
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. #if PRAGMA_IMPORT
  45. #pragma import on
  46. #endif
  47.  
  48. #if PRAGMA_STRUCT_ALIGN
  49.     #pragma options align=mac68k
  50. #elif PRAGMA_STRUCT_PACKPUSH
  51.     #pragma pack(push, 2)
  52. #elif PRAGMA_STRUCT_PACK
  53.     #pragma pack(2)
  54. #endif
  55.  
  56. #if defined(__MWERKS__) && TARGET_CPU_68K
  57.     #pragma push
  58.     #pragma pointers_in_D0
  59. #endif
  60.  
  61. EXTERN_API_C( gxFont )
  62. GXNewFont                        (gxFontStorageTag         storage,
  63.                                  gxFontStorageReference  reference,
  64.                                  gxFontAttribute         attributes)                            THREEWORDINLINE(0x303C, 0x0201, 0xA832);
  65.  
  66. EXTERN_API_C( gxFontStorageTag )
  67. GXGetFont                        (gxFont                 fontID,
  68.                                  gxFontStorageReference * reference,
  69.                                  gxFontAttribute *        attributes)                            THREEWORDINLINE(0x303C, 0x0202, 0xA832);
  70.  
  71. EXTERN_API_C( gxFont )
  72. GXFindFont                        (gxFontStorageTag         storage,
  73.                                  gxFontStorageReference  reference,
  74.                                  gxFontAttribute *        attributes)                            THREEWORDINLINE(0x303C, 0x0203, 0xA832);
  75.  
  76. EXTERN_API_C( void )
  77. GXSetFont                        (gxFont                 fontID,
  78.                                  gxFontStorageTag         storage,
  79.                                  gxFontStorageReference  reference,
  80.                                  gxFontAttribute         attributes)                            THREEWORDINLINE(0x303C, 0x0204, 0xA832);
  81.  
  82. EXTERN_API_C( void )
  83. GXDisposeFont                    (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x0205, 0xA832);
  84.  
  85. EXTERN_API_C( void )
  86. GXChangedFont                    (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x0206, 0xA832);
  87.  
  88. EXTERN_API_C( gxFontFormatTag )
  89. GXGetFontFormat                    (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x0207, 0xA832);
  90.  
  91. EXTERN_API_C( gxFont )
  92. GXGetDefaultFont                (void)                                                        THREEWORDINLINE(0x303C, 0x0208, 0xA832);
  93.  
  94. EXTERN_API_C( gxFont )
  95. GXSetDefaultFont                (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x0209, 0xA832);
  96.  
  97. EXTERN_API_C( long )
  98. GXFindFonts                        (gxFont                 familyID,
  99.                                  gxFontName             name,
  100.                                  gxFontPlatform         platform,
  101.                                  gxFontScript             script,
  102.                                  gxFontLanguage         language,
  103.                                  long                     length,
  104.                                  const unsigned char     text[],
  105.                                  long                     index,
  106.                                  long                     count,
  107.                                  gxFont                 fonts[])                                THREEWORDINLINE(0x303C, 0x020A, 0xA832);
  108.  
  109. EXTERN_API_C( long )
  110. GXCountFontGlyphs                (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x020B, 0xA832);
  111.  
  112. EXTERN_API_C( long )
  113. GXCountFontTables                (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x020C, 0xA832);
  114.  
  115. EXTERN_API_C( long )
  116. GXGetFontTable                    (gxFont                 fontID,
  117.                                  long                     index,
  118.                                  void *                    tableData,
  119.                                  gxFontTableTag *        tableTag)                            THREEWORDINLINE(0x303C, 0x020D, 0xA832);
  120.  
  121. EXTERN_API_C( long )
  122. GXFindFontTable                    (gxFont                 fontID,
  123.                                  gxFontTableTag         tableTag,
  124.                                  void *                    tableData,
  125.                                  long *                    index)                                THREEWORDINLINE(0x303C, 0x020E, 0xA832);
  126.  
  127. EXTERN_API_C( long )
  128. GXGetFontTableParts                (gxFont                 fontID,
  129.                                  long                     index,
  130.                                  long                     offset,
  131.                                  long                     length,
  132.                                  void *                    tableData,
  133.                                  gxFontTableTag *        tableTag)                            THREEWORDINLINE(0x303C, 0x020F, 0xA832);
  134.  
  135. EXTERN_API_C( long )
  136. GXFindFontTableParts            (gxFont                 fontID,
  137.                                  gxFontTableTag         tableTag,
  138.                                  long                     offset,
  139.                                  long                     length,
  140.                                  void *                    tableData,
  141.                                  long *                    index)                                THREEWORDINLINE(0x303C, 0x0210, 0xA832);
  142.  
  143. EXTERN_API_C( long )
  144. GXSetFontTable                    (gxFont                 fontID,
  145.                                  long                     index,
  146.                                  gxFontTableTag         tableTag,
  147.                                  long                     length,
  148.                                  const void *            tableData)                            THREEWORDINLINE(0x303C, 0x0211, 0xA832);
  149.  
  150. EXTERN_API_C( long )
  151. GXSetFontTableParts                (gxFont                 fontID,
  152.                                  long                     index,
  153.                                  gxFontTableTag         tableTag,
  154.                                  long                     offset,
  155.                                  long                     oldLength,
  156.                                  long                     newLength,
  157.                                  const void *            tableData)                            THREEWORDINLINE(0x303C, 0x0212, 0xA832);
  158.  
  159. EXTERN_API_C( long )
  160. GXDeleteFontTable                (gxFont                 fontID,
  161.                                  long                     index,
  162.                                  gxFontTableTag         tableTag)                            THREEWORDINLINE(0x303C, 0x0213, 0xA832);
  163.  
  164. EXTERN_API_C( long )
  165. GXCountFontNames                (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x0214, 0xA832);
  166.  
  167. EXTERN_API_C( long )
  168. GXGetFontName                    (gxFont                 fontID,
  169.                                  long                     index,
  170.                                  gxFontName *            name,
  171.                                  gxFontPlatform *        platform,
  172.                                  gxFontScript *            script,
  173.                                  gxFontLanguage *        language,
  174.                                  unsigned char             text[])                                THREEWORDINLINE(0x303C, 0x0215, 0xA832);
  175.  
  176. EXTERN_API_C( long )
  177. GXFindFontName                    (gxFont                 fontID,
  178.                                  gxFontName             name,
  179.                                  gxFontPlatform         platform,
  180.                                  gxFontScript             script,
  181.                                  gxFontLanguage         language,
  182.                                  unsigned char             text[],
  183.                                  long *                    index)                                THREEWORDINLINE(0x303C, 0x0216, 0xA832);
  184.  
  185. EXTERN_API_C( long )
  186. GXSetFontName                    (gxFont                 fontID,
  187.                                  gxFontName             name,
  188.                                  gxFontPlatform         platform,
  189.                                  gxFontScript             script,
  190.                                  gxFontLanguage         language,
  191.                                  long                     length,
  192.                                  const unsigned char     text[])                                THREEWORDINLINE(0x303C, 0x0217, 0xA832);
  193.  
  194. EXTERN_API_C( long )
  195. GXDeleteFontName                (gxFont                 fontID,
  196.                                  long                     index,
  197.                                  gxFontName             name,
  198.                                  gxFontPlatform         platform,
  199.                                  gxFontScript             script,
  200.                                  gxFontLanguage         language)                            THREEWORDINLINE(0x303C, 0x0218, 0xA832);
  201.  
  202. EXTERN_API_C( gxFontName )
  203. GXNewFontNameID                    (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x0219, 0xA832);
  204.  
  205. EXTERN_API_C( long )
  206. GXCountFontEncodings            (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x021A, 0xA832);
  207.  
  208. EXTERN_API_C( gxFontPlatform )
  209. GXGetFontEncoding                (gxFont                 fontID,
  210.                                  long                     index,
  211.                                  gxFontScript *            script,
  212.                                  gxFontLanguage *        language)                            THREEWORDINLINE(0x303C, 0x021B, 0xA832);
  213.  
  214. EXTERN_API_C( long )
  215. GXFindFontEncoding                (gxFont                 fontID,
  216.                                  gxFontPlatform         platform,
  217.                                  gxFontScript             script,
  218.                                  gxFontLanguage         language)                            THREEWORDINLINE(0x303C, 0x021C, 0xA832);
  219.  
  220. EXTERN_API_C( long )
  221. GXApplyFontEncoding                (gxFont                 fontID,
  222.                                  long                     index,
  223.                                  long *                    length,
  224.                                  const unsigned char     text[],
  225.                                  long                     count,
  226.                                  unsigned short         glyphs[],
  227.                                  char                     was16Bit[])                            THREEWORDINLINE(0x303C, 0x021D, 0xA832);
  228.  
  229. EXTERN_API_C( long )
  230. GXCountFontVariations            (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x021E, 0xA832);
  231.  
  232. EXTERN_API_C( long )
  233. GXFindFontVariation                (gxFont                 fontID,
  234.                                  gxFontVariationTag     variationTag,
  235.                                  Fixed *                minValue,
  236.                                  Fixed *                defaultValue,
  237.                                  Fixed *                maxValue,
  238.                                  gxFontName *            name)                                THREEWORDINLINE(0x303C, 0x021F, 0xA832);
  239.  
  240. EXTERN_API_C( gxFontVariationTag )
  241. GXGetFontVariation                (gxFont                 fontID,
  242.                                  long                     index,
  243.                                  Fixed *                minValue,
  244.                                  Fixed *                defaultValue,
  245.                                  Fixed *                maxValue,
  246.                                  gxFontName *            name)                                THREEWORDINLINE(0x303C, 0x0220, 0xA832);
  247.  
  248. EXTERN_API_C( long )
  249. GXCountFontInstances            (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x0221, 0xA832);
  250.  
  251. EXTERN_API_C( gxFontName )
  252. GXGetFontInstance                (gxFont                 fontID,
  253.                                  long                     index,
  254.                                  gxFontVariation         variation[])                            THREEWORDINLINE(0x303C, 0x0222, 0xA832);
  255.  
  256. EXTERN_API_C( long )
  257. GXSetFontInstance                (gxFont                 fontID,
  258.                                  long                     index,
  259.                                  gxFontName             name,
  260.                                  const gxFontVariation     variation[])                            THREEWORDINLINE(0x303C, 0x0223, 0xA832);
  261.  
  262. EXTERN_API_C( long )
  263. GXDeleteFontInstance            (gxFont                 fontID,
  264.                                  long                     index,
  265.                                  gxFontName             name)                                THREEWORDINLINE(0x303C, 0x0224, 0xA832);
  266.  
  267. EXTERN_API_C( long )
  268. GXCountFontDescriptors            (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x0225, 0xA832);
  269.  
  270. EXTERN_API_C( gxFontDescriptorTag )
  271. GXGetFontDescriptor                (gxFont                 fontID,
  272.                                  long                     index,
  273.                                  Fixed *                descriptorValue)                    THREEWORDINLINE(0x303C, 0x0226, 0xA832);
  274.  
  275. EXTERN_API_C( long )
  276. GXFindFontDescriptor            (gxFont                 fontID,
  277.                                  gxFontDescriptorTag     descriptorTag,
  278.                                  Fixed *                descriptorValue)                    THREEWORDINLINE(0x303C, 0x0227, 0xA832);
  279.  
  280. EXTERN_API_C( long )
  281. GXSetFontDescriptor                (gxFont                 fontID,
  282.                                  long                     index,
  283.                                  gxFontDescriptorTag     descriptorTag,
  284.                                  Fixed                     descriptorValue)                    THREEWORDINLINE(0x303C, 0x0228, 0xA832);
  285.  
  286. EXTERN_API_C( long )
  287. GXDeleteFontDescriptor            (gxFont                 fontID,
  288.                                  long                     index,
  289.                                  gxFontDescriptorTag     descriptorTag)                        THREEWORDINLINE(0x303C, 0x0229, 0xA832);
  290.  
  291. EXTERN_API_C( long )
  292. GXCountFontFeatures                (gxFont                 fontID)                                THREEWORDINLINE(0x303C, 0x022A, 0xA832);
  293.  
  294. EXTERN_API_C( gxFontName )
  295. GXGetFontFeature                (gxFont                 fontID,
  296.                                  long                     index,
  297.                                  gxFontFeatureFlag *    flags,
  298.                                  long *                    settingCount,
  299.                                  gxFontFeatureSetting     settings[],
  300.                                  gxFontFeature *        feature)                            THREEWORDINLINE(0x303C, 0x022B, 0xA832);
  301.  
  302. EXTERN_API_C( gxFontName )
  303. GXFindFontFeature                (gxFont                 fontID,
  304.                                  gxFontFeature             feature,
  305.                                  gxFontFeatureFlag *    flags,
  306.                                  long *                    settingCount,
  307.                                  gxFontFeatureSetting     settings[],
  308.                                  long *                    index)                                THREEWORDINLINE(0x303C, 0x022C, 0xA832);
  309.  
  310. EXTERN_API_C( long )
  311. GXGetFontDefaultFeatures        (gxFont                 fontID,
  312.                                  gxRunFeature             features[])                            THREEWORDINLINE(0x303C, 0x0274, 0xA832);
  313.  
  314. EXTERN_API_C( void )
  315. GXFlattenFont                    (gxFont                 source,
  316.                                  scalerStream *            stream,
  317.                                  gxSpoolBlock *            block)                                THREEWORDINLINE(0x303C, 0x022D, 0xA832);
  318.  
  319.  
  320.  
  321. #if defined(__MWERKS__) && TARGET_CPU_68K
  322.     #pragma pop
  323. #endif
  324.  
  325. #if PRAGMA_STRUCT_ALIGN
  326.     #pragma options align=reset
  327. #elif PRAGMA_STRUCT_PACKPUSH
  328.     #pragma pack(pop)
  329. #elif PRAGMA_STRUCT_PACK
  330.     #pragma pack()
  331. #endif
  332.  
  333. #ifdef PRAGMA_IMPORT_OFF
  334. #pragma import off
  335. #elif PRAGMA_IMPORT
  336. #pragma import reset
  337. #endif
  338.  
  339. #ifdef __cplusplus
  340. }
  341. #endif
  342.  
  343. #endif /* __GXFONTS__ */
  344.  
  345.